
<html lang=""><head>
    <title>画布 · MINA</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <meta name="description" content="">
    <meta name="generator" content="GitBook 3.2.0">




    <link rel="stylesheet" href="../../gitbook/style.css">




    <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">



    <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">























    <meta name="HandheldFriendly" content="true">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">


    <link rel="next" href="../api/">


    <link rel="prev" href="map.html">


</head>
<body>

<div class="book with-summary">
    <div>

        <div class="sub_nav_box">
            <div class="sub_nav_inner">




                <ul class="top_sub_nav">




                    <li class="sub_nav_item " data-level="1.1" data-path="../">

                        <a href="../">


                            简易教程

                        </a>

                    </li>

                    <li class="sub_nav_item " data-level="1.2" data-path="../framework/MINA.html">

                        <a href="../framework/MINA.html">


                            框架

                        </a>

                    </li>

                    <li class="sub_nav_item selected" data-level="1.3" data-path="./">

                        <a href="./">


                            组件

                        </a>

                    </li>

                    <li class="sub_nav_item " data-level="1.4" data-path="../api/">

                        <a href="../api/">


                            API

                        </a>

                    </li>

                    <li class="sub_nav_item " data-level="1.5" data-path="../devtools/devtools.html">

                        <a href="../devtools/devtools.html">


                            工具

                        </a>

                    </li>

                    <li class="sub_nav_item " data-level="1.6" data-path="../qa/qa.html">

                        <a href="../qa/qa.html">


                            Q&amp;A

                        </a>

                    </li>




                </ul>




                <!-- <h1>画布</h1> -->
                <div id="book-search-input" role="search">
                    <form>
                        <label for="search-input" class="search-icon" id="js-search-icon"></label>
                        <input type="text" id="search-input" name="search-input" placeholder="搜索">
                        <button type="reset" class="clear-input-btn"></button>
                    </form>
                </div>
            </div>
        </div>

        <div class="book-summary">


            <nav role="navigation">





                <ul class="summary">


                    <li class="chapter  open" data-level="1.3.1" data-path="view.html">

                        <a href="view.html">


                            视图容器

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.1.1" data-path="view.html">

                                <a href="view.html">


                                    view

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.1.2" data-path="scroll-view.html">

                                <a href="scroll-view.html">


                                    scroll-view

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.1.3" data-path="swiper.html">

                                <a href="swiper.html">


                                    swiper

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.2" data-path="icon.html">

                        <a href="icon.html">


                            基础内容

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.2.1" data-path="icon.html">

                                <a href="icon.html">


                                    icon

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.2.2" data-path="text.html">

                                <a href="text.html">


                                    text

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.2.3" data-path="progress.html">

                                <a href="progress.html">


                                    progress

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.3" data-path="button.html">

                        <a href="button.html">


                            表单组件

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.3.1" data-path="button.html">

                                <a href="button.html">


                                    button

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.2" data-path="checkbox.html">

                                <a href="checkbox.html">


                                    checkbox

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.3" data-path="form.html">

                                <a href="form.html">


                                    form

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.4" data-path="input.html">

                                <a href="input.html">


                                    input

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.5" data-path="label.html">

                                <a href="label.html">


                                    label

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.6" data-path="picker.html">

                                <a href="picker.html">


                                    picker

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.7" data-path="radio.html">

                                <a href="radio.html">


                                    radio

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.8" data-path="slider.html">

                                <a href="slider.html">


                                    slider

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.3.9" data-path="switch.html">

                                <a href="switch.html">


                                    switch

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.4" data-path="action-sheet.html">

                        <a href="action-sheet.html">


                            操作反馈

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.4.1" data-path="action-sheet.html">

                                <a href="action-sheet.html">


                                    action-sheet

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.4.2" data-path="modal.html">

                                <a href="modal.html">


                                    modal

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.4.3" data-path="toast.html">

                                <a href="toast.html">


                                    toast

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.4.4" data-path="loading.html">

                                <a href="loading.html">


                                    loading

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.5" data-path="navigator.html">

                        <a href="navigator.html">


                            导航

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.5.1" data-path="navigator.html">

                                <a href="navigator.html">


                                    navigator

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.6" data-path="audio.html">

                        <a href="audio.html">


                            媒体组件

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.6.1" data-path="audio.html">

                                <a href="audio.html">


                                    audio

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.6.2" data-path="image.html">

                                <a href="image.html">


                                    image

                                </a>



                            </li>

                            <li class="chapter  " data-level="1.3.6.3" data-path="video.html">

                                <a href="video.html">


                                    video

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter  open" data-level="1.3.7" data-path="map.html">

                        <a href="map.html">


                            地图

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.7.1" data-path="map.html">

                                <a href="map.html#map">


                                    map

                                </a>



                            </li>


                        </ul>

                    </li>

                    <li class="chapter active open" data-level="1.3.8" data-path="canvas.html">

                        <a href="canvas.html">


                            画布

                        </a>



                        <ul class="articles">


                            <li class="chapter  " data-level="1.3.8.1" data-path="canvas.html">

                                <a href="canvas.html#canvas">


                                    canvas

                                </a>



                            </li>


                        </ul>

                    </li>


                </ul>


            </nav>


        </div>

        <div class="book-body">

            <div class="body-inner">

                <!--

                <div class="book-header" role="navigation">

                </div>


                 -->

                <div class="page-wrapper" tabindex="-1" role="main">
                    <div class="page-inner">

                        <div id="book-search-results">
                            <div class="search-noresults">

                                <section class="normal markdown-section">

                                    <h2 id="canvas">canvas</h2><table>
                                    <thead>
                                    <tr><th>属性名</th>
                                        <th>类型</th>
                                        <th>默认值</th>
                                        <th>说明</th>
                                    </tr></thead><tbody>
                                <tr><td>hidden</td>
                                    <td>Boolean</td>
                                    <td>false</td>
                                    <td>设置画布的显示/隐藏，hidden值为true表示隐藏，值为false表示显示</td>
                                </tr><tr><td>canvas-id</td>
                                    <td>String</td>
                                    <td></td>
                                    <td>canvas组件的唯一标识符</td>
                                </tr><tr><td>binderror</td>
                                    <td>EventHandle</td>
                                    <td></td>
                                    <td>当发生错误时触发error事件，detail = { errMsg: 'something wrong' }</td>
                                </tr></tbody></table>

                                    <p><strong>注：</strong></p><ol><li><p><strong>canvas标签默认宽度300px、高度225px</strong></p></li>
                                    <li><p><strong>同一页面中的canvas-id不可重复，如果使用一个已经出现过的canvas-id，该canvas标签对应的画布将被隐藏并不再正常工作</strong></p></li></ol>
                                    <p><strong>示例代码：<a href="../../demo/api-canvas.zip">下载</a></strong></p><pre><code class="lang-html"><span class="hljs-comment">&lt;!-- canvas.wxml --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">canvas</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 300px; height: 200px;"</span> <span class="hljs-attr">canvas-id</span>=<span class="hljs-string">"firstCanvas"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">canvas</span>&gt;</span>
<span class="hljs-comment">&lt;!-- 当使用绝对定位时，文档流后边的canvas的显示层级高于前边的canvas--&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">canvas</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 400px; height: 500px;"</span> <span class="hljs-attr">canvas-id</span>=<span class="hljs-string">"secondCanvas"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">canvas</span>&gt;</span>
<span class="hljs-comment">&lt;!-- 因为canvas-id与前一个canvas重复，该canvas不会显示，并会发送一个错误事件到AppService --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">canvas</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 400px; height: 500px;"</span> <span class="hljs-attr">canvas-id</span>=<span class="hljs-string">"secondCanvas"</span> <span class="hljs-attr">binderror</span>=<span class="hljs-string">"canvasIdErrorCallback"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">canvas</span>&gt;</span></code></pre>
<pre><code class="lang-javascript"><span class="hljs-comment">// canvas.js</span>
Page({
  canvasIdErrorCallback: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">e</span>) </span>{
    <span class="hljs-built_in">console</span>.error(e.detail.errMsg);
  },
  onReady: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">e</span>) </span>{

    <span class="hljs-comment">//使用wx.createContext获取绘图上下文context</span>
    <span class="hljs-keyword">var</span> context = wx.createContext();

    context.setStrokeStyle(<span class="hljs-string">"#00ff00"</span>);
    context.setLineWidth(<span class="hljs-number">5</span>);
    context.rect(<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">200</span>,<span class="hljs-number">200</span>);
    context.stroke()
    context.setStrokeStyle (<span class="hljs-string">"#ff0000"</span>) ;
    context.setLineWidth (<span class="hljs-number">2</span>)
    context.moveTo(<span class="hljs-number">160</span>,<span class="hljs-number">100</span>)
    context.arc(<span class="hljs-number">100</span>,<span class="hljs-number">100</span>,<span class="hljs-number">60</span>,<span class="hljs-number">0</span>,<span class="hljs-number">2</span>*<span class="hljs-built_in">Math</span>.PI,<span class="hljs-literal">true</span>);
    context.moveTo(<span class="hljs-number">140</span>,<span class="hljs-number">100</span>);
    context.arc(<span class="hljs-number">100</span>,<span class="hljs-number">100</span>,<span class="hljs-number">40</span>,<span class="hljs-number">0</span>,<span class="hljs-built_in">Math</span>.PI,<span class="hljs-literal">false</span>);
    context.moveTo(<span class="hljs-number">85</span>,<span class="hljs-number">80</span>);
    context.arc(<span class="hljs-number">80</span>,<span class="hljs-number">80</span>,<span class="hljs-number">5</span>,<span class="hljs-number">0</span>,<span class="hljs-number">2</span>*<span class="hljs-built_in">Math</span>.PI,<span class="hljs-literal">true</span>);
    context.moveTo(<span class="hljs-number">125</span>,<span class="hljs-number">80</span>);
    context.arc(<span class="hljs-number">120</span>,<span class="hljs-number">80</span>,<span class="hljs-number">5</span>,<span class="hljs-number">0</span>,<span class="hljs-number">2</span>*<span class="hljs-built_in">Math</span>.PI,<span class="hljs-literal">true</span>);
    context.stroke();

    <span class="hljs-comment">//调用wx.drawCanvas，通过canvasId指定在哪张画布上绘制，通过actions指定绘制行为</span>
    wx.drawCanvas({
      canvasId: <span class="hljs-string">'firstCanvas'</span>,
      actions: context.getActions() <span class="hljs-comment">//获取绘图动作数组</span>
    });
  }
});</code></pre>
                                    <p>相关api：<a href="../api/api-canvas.html">wx.createContext</a>、<a href="../api/api-canvas.html#wxdrawcanvas">wx.drawCanvas</a></p>

                                </section>

                            </div>
                            <div class="search-results">
                                <div class="has-results">

                                    <h1 class="search-results-title"><span class="search-results-count"></span> 个结果 "<span class="search-query"></span>"</h1>
                                    <ul class="search-results-list"></ul>

                                </div>
                                <div class="no-results">

                                    <h1 class="search-results-title">没有找到相关内容 "<span class="search-query"></span>"</h1>

                                </div>
                            </div>
                        </div>

                    </div>
                </div>
                <div class="foot" id="footer">
                    <ul class="links ft">
                        <li class="links_item"><a href="">关于腾讯</a></li>
                        <li class="links_item"><a href="">服务协议</a></li>
                        <li class="links_item"><a href="">运营规范</a></li>
                        <li class="links_item"><a href="">辟谣中心</a></li>
                        <li class="links_item"><a href="">客服中心</a></li>
                        <li class="links_item"><a href="">联系邮箱</a></li>
                        <li class="links_item"><a href="">侵权投诉</a></li>
                        <li class="links_item">
                            <p class="copyright">Copyright © 2012-<span id="s_copyright_year"></span> Tencent. All Rights Reserved.</p>
                        </li>
                    </ul>
                </div>

            </div>



            <a href="map.html#map" class="navigation navigation-prev " aria-label="Previous page: map">
                <i class="fa fa-angle-left"></i>
            </a>


            <a href="../api/" class="navigation navigation-next " aria-label="Next page: API">
                <i class="fa fa-angle-right"></i>
            </a>



        </div>
    </div>


    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>


    <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>



    <script src="../../gitbook/gitbook-plugin-search/search.js"></script>



    <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>



    <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>


    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"画布","level":"1.3.8","depth":2,"next":{"title":"API","level":"1.4","depth":1,"path":"api/index.md","ref":"api/index.md","articles":[{"title":"网络","level":"1.4.1","depth":2,"path":"api/api-network.md","ref":"api/api-network.md","articles":[{"title":"发起请求","level":"1.4.1.1","depth":3,"path":"api/network-request.md","ref":"api/network-request.md","articles":[]},{"title":"上传、下载","level":"1.4.1.2","depth":3,"path":"api/network-file.md","ref":"api/network-file.md","articles":[{"title":"wx.uploadFile","level":"1.4.1.2.1","depth":4,"anchor":"#wxuploadfileobject","path":"api/network-file.md","ref":"api/network-file.md#wxuploadfileobject","articles":[]},{"title":"wx.downloadFile","level":"1.4.1.2.2","depth":4,"anchor":"#wxdownloadfileobject","path":"api/network-file.md","ref":"api/network-file.md#wxdownloadfileobject","articles":[]}]},{"title":"WebSocket","level":"1.4.1.3","depth":3,"path":"api/network-socket.md","ref":"api/network-socket.md","articles":[{"title":"wx.connectSocket","level":"1.4.1.3.1","depth":4,"anchor":"#wxconnectsocketobject","path":"api/network-socket.md","ref":"api/network-socket.md#wxconnectsocketobject","articles":[]},{"title":"wx.onSocketOpen","level":"1.4.1.3.2","depth":4,"anchor":"#wxonsocketopencallback","path":"api/network-socket.md","ref":"api/network-socket.md#wxonsocketopencallback","articles":[]},{"title":"wx.onSocketError","level":"1.4.1.3.3","depth":4,"anchor":"#wxonsocketerrorcallback","path":"api/network-socket.md","ref":"api/network-socket.md#wxonsocketerrorcallback","articles":[]},{"title":"wx.sendSocketMessage","level":"1.4.1.3.4","depth":4,"anchor":"#wxsendsocketmessageobject","path":"api/network-socket.md","ref":"api/network-socket.md#wxsendsocketmessageobject","articles":[]},{"title":"wx.onSocketMessage","level":"1.4.1.3.5","depth":4,"anchor":"#wxonsocketmessagecallback","path":"api/network-socket.md","ref":"api/network-socket.md#wxonsocketmessagecallback","articles":[]},{"title":"wx.closeSocket","level":"1.4.1.3.6","depth":4,"anchor":"#wxclosesocket","path":"api/network-socket.md","ref":"api/network-socket.md#wxclosesocket","articles":[]},{"title":"wx.onSocketClose","level":"1.4.1.3.7","depth":4,"anchor":"#wxonsocketclosecallback","path":"api/network-socket.md","ref":"api/network-socket.md#wxonsocketclosecallback","articles":[]}]}]},{"title":"媒体","level":"1.4.2","depth":2,"path":"api/media-picture.md","ref":"api/media-picture.md","articles":[{"title":"图片","level":"1.4.2.1","depth":3,"path":"api/media-picture.md","ref":"api/media-picture.md","articles":[{"title":"wx.chooseImage","level":"1.4.2.1.1","depth":4,"anchor":"#wxchooseimageobject","path":"api/media-picture.md","ref":"api/media-picture.md#wxchooseimageobject","articles":[]},{"title":"wx.previewImage","level":"1.4.2.1.2","depth":4,"anchor":"#wxpreviewimageobject","path":"api/media-picture.md","ref":"api/media-picture.md#wxpreviewimageobject","articles":[]}]},{"title":"录音","level":"1.4.2.2","depth":3,"path":"api/media-record.md","ref":"api/media-record.md","articles":[{"title":"wx.startRecord","level":"1.4.2.2.1","depth":4,"anchor":"#wxstartrecordobject","path":"api/media-record.md","ref":"api/media-record.md#wxstartrecordobject","articles":[]},{"title":"wx.stopRecord","level":"1.4.2.2.2","depth":4,"anchor":"#wxstoprecord","path":"api/media-record.md","ref":"api/media-record.md#wxstoprecord","articles":[]}]},{"title":"音频播放控制","level":"1.4.2.3","depth":3,"path":"api/media-voice.md","ref":"api/media-voice.md","articles":[{"title":"wx.playVoice","level":"1.4.2.3.1","depth":4,"anchor":"#wxplayvoiceobject","path":"api/media-voice.md","ref":"api/media-voice.md#wxplayvoiceobject","articles":[]},{"title":"wx.pauseVoice","level":"1.4.2.3.2","depth":4,"anchor":"#wxpausevoice","path":"api/media-voice.md","ref":"api/media-voice.md#wxpausevoice","articles":[]},{"title":"wx.stopVoice","level":"1.4.2.3.3","depth":4,"anchor":"#wxstopvoice","path":"api/media-voice.md","ref":"api/media-voice.md#wxstopvoice","articles":[]}]},{"title":"音乐播放控制","level":"1.4.2.4","depth":3,"path":"api/media-background-audio.md","ref":"api/media-background-audio.md","articles":[{"title":"wx.getBackgroundAudioPlayerState","level":"1.4.2.4.1","depth":4,"anchor":"#wxgetbackgroundaudioplayerstateobject","path":"api/media-background-audio.md","ref":"api/media-background-audio.md#wxgetbackgroundaudioplayerstateobject","articles":[]},{"title":"wx.playBackgroundAudio","level":"1.4.2.4.2","depth":4,"anchor":"#wxplaybackgroundaudioobject","path":"api/media-background-audio.md","ref":"api/media-background-audio.md#wxplaybackgroundaudioobject","articles":[]},{"title":"wx.pauseBackgroundAudio","level":"1.4.2.4.3","depth":4,"anchor":"#wxpausebackgroundaudio","path":"api/media-background-audio.md","ref":"api/media-background-audio.md#wxpausebackgroundaudio","articles":[]},{"title":"wx.seekBackgroundAudio","level":"1.4.2.4.4","depth":4,"anchor":"#wxseekbackgroundaudioobject","path":"api/media-background-audio.md","ref":"api/media-background-audio.md#wxseekbackgroundaudioobject","articles":[]},{"title":"wx.stopBackgroundAudio","level":"1.4.2.4.5","depth":4,"anchor":"#wxstopbackgroundaudio","path":"api/media-background-audio.md","ref":"api/media-background-audio.md#wxstopbackgroundaudio","articles":[]},{"title":"wx.onBackgroundAudioPlay","level":"1.4.2.4.6","depth":4,"anchor":"#wxonbackgroundaudioplaycallback","path":"api/media-background-audio.md","ref":"api/media-background-audio.md#wxonbackgroundaudioplaycallback","articles":[]},{"title":"wx.onBackgroundAudioPause","level":"1.4.2.4.7","depth":4,"anchor":"#wxonbackgroundaudiopausecallback","path":"api/media-background-audio.md","ref":"api/media-background-audio.md#wxonbackgroundaudiopausecallback","articles":[]},{"title":"wx.onBackgroundAudioStop","level":"1.4.2.4.8","depth":4,"anchor":"#wxonbackgroundaudiostopcallback","path":"api/media-background-audio.md","ref":"api/media-background-audio.md#wxonbackgroundaudiostopcallback","articles":[]}]},{"title":"文件","level":"1.4.2.5","depth":3,"path":"api/file.md","ref":"api/file.md","articles":[]},{"title":"视频","level":"1.4.2.6","depth":3,"path":"api/media-video.md","ref":"api/media-video.md","articles":[]}]},{"title":"数据","level":"1.4.3","depth":2,"path":"api/data.md","ref":"api/data.md","articles":[{"title":"数据缓存","level":"1.4.3.1","depth":3,"path":"api/data.md","ref":"api/data.md","articles":[{"title":"wx.setStorage","level":"1.4.3.1.1","depth":4,"anchor":"#wxsetstorageobject","path":"api/data.md","ref":"api/data.md#wxsetstorageobject","articles":[]},{"title":"wx.setStorageSync","level":"1.4.3.1.2","depth":4,"anchor":"#wxsetstoragesynckeyvalue","path":"api/data.md","ref":"api/data.md#wxsetstoragesynckeyvalue","articles":[]},{"title":"wx.getStorage","level":"1.4.3.1.3","depth":4,"anchor":"#wxgetstorageobject","path":"api/data.md","ref":"api/data.md#wxgetstorageobject","articles":[]},{"title":"wx.getStorageSync","level":"1.4.3.1.4","depth":4,"anchor":"#wxgetstoragesynckey","path":"api/data.md","ref":"api/data.md#wxgetstoragesynckey","articles":[]},{"title":"wx.clearStorage","level":"1.4.3.1.5","depth":4,"anchor":"#wxclearstorage","path":"api/data.md","ref":"api/data.md#wxclearstorage","articles":[]},{"title":"wx.clearStorageSync","level":"1.4.3.1.6","depth":4,"anchor":"#wxclearstoragesync","path":"api/data.md","ref":"api/data.md#wxclearstoragesync","articles":[]}]}]},{"title":"位置","level":"1.4.4","depth":2,"path":"api/location.md","ref":"api/location.md","articles":[{"title":"获取位置","level":"1.4.4.1","depth":3,"anchor":"#wxgetlocationobject","path":"api/location.md","ref":"api/location.md#wxgetlocationobject","articles":[]},{"title":"查看位置","level":"1.4.4.2","depth":3,"anchor":"#wxopenlocationobject","path":"api/location.md","ref":"api/location.md#wxopenlocationobject","articles":[]}]},{"title":"设备","level":"1.4.5","depth":2,"path":"api/device.md","ref":"api/device.md","articles":[{"title":"网络状态","level":"1.4.5.1","depth":3,"anchor":"#wxgetnetworktypeobject","path":"api/device.md","ref":"api/device.md#wxgetnetworktypeobject","articles":[]},{"title":"系统信息","level":"1.4.5.2","depth":3,"anchor":"#wxgetsysteminfoobject","path":"api/device.md","ref":"api/device.md#wxgetsysteminfoobject","articles":[]},{"title":"重力感应","level":"1.4.5.3","depth":3,"anchor":"#wxonaccelerometerchangecallback","path":"api/device.md","ref":"api/device.md#wxonaccelerometerchangecallback","articles":[]},{"title":"罗盘","level":"1.4.5.4","depth":3,"anchor":"#wxoncompasschangecallback","path":"api/device.md","ref":"api/device.md#wxoncompasschangecallback","articles":[]}]},{"title":"界面","level":"1.4.6","depth":2,"path":"api/ui.md","ref":"api/ui.md","articles":[{"title":"设置导航条","level":"1.4.6.1","depth":3,"path":"api/ui.md","ref":"api/ui.md","articles":[]},{"title":"导航","level":"1.4.6.2","depth":3,"path":"api/ui-navigate.md","ref":"api/ui-navigate.md","articles":[]},{"title":"动画","level":"1.4.6.3","depth":3,"path":"api/api-animation.md","ref":"api/api-animation.md","articles":[]},{"title":"绘图","level":"1.4.6.4","depth":3,"path":"api/api-canvas.md","ref":"api/api-canvas.md","articles":[]},{"title":"其他","level":"1.4.6.5","depth":3,"path":"api/ui-other.md","ref":"api/ui-other.md","articles":[]}]},{"title":"开放接口","level":"1.4.7","depth":2,"path":"api/api-login.md","ref":"api/api-login.md","articles":[{"title":"登录","level":"1.4.7.1","depth":3,"path":"api/api-login.md","ref":"api/api-login.md","articles":[{"title":"签名加密","level":"1.4.7.1.1","depth":4,"path":"api/signature.md","ref":"api/signature.md","articles":[]}]},{"title":"用户信息","level":"1.4.7.2","depth":3,"path":"api/open.md","ref":"api/open.md","articles":[]},{"title":"微信支付","level":"1.4.7.3","depth":3,"path":"api/api-pay.md","ref":"api/api-pay.md","articles":[]},{"title":"模板消息","level":"1.4.7.4","depth":3,"path":"api/notice.md","ref":"api/notice.md","articles":[{"title":"使用说明","level":"1.4.7.4.1","depth":4,"anchor":"#使用说明","path":"api/notice.md","ref":"api/notice.md#使用说明","articles":[]},{"title":"接口说明","level":"1.4.7.4.2","depth":4,"anchor":"#接口说明","path":"api/notice.md","ref":"api/notice.md#接口说明","articles":[]}]}]}]},"previous":{"title":"map","level":"1.3.7.1","depth":3,"anchor":"#map","path":"component/map.md","ref":"component/map.md#map","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"theme-default":{"showLevel":false,"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"}}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"}},"file":{"path":"component/canvas.md","mtime":"2016-09-21T05:53:11.000Z","type":"markdown"},"gitbook":{"version":"3.2.0","time":"2016-09-22T09:40:22.799Z"},"basePath":"..","book":{"language":""}});
        });
    </script>




</div></body></html>